<?php


namespace App\Controller\Admin;


use App\Controller\AbstractController;
use App\Dao\CooperativeDao;
use App\Request\Admin\PublicCommonRequest;
use Hyperf\Di\Annotation\Inject;

class PublicCommonController extends AbstractController
{
    /**
     * @Inject()
     * @var CooperativeDao
     */
    protected $cooperativeDao;

    /**
     * 根据城市获取合作商列表
     * @param PublicCommonRequest $request
     * @return mixed|\Psr\Http\Message\ResponseInterface
     */
    public function regionCoopers(PublicCommonRequest $request)
    {
       $validated = $request->validated();
       $data = $this->cooperativeDao->getRegionCooperatives($validated);
       return $this->response->success($data);
    }

}